﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Comteck.Dto.Common {
  /// <summary>
  /// 日期切片方式
  /// </summary>
  public enum EnumDateSplitMode {
    /// <summary>
    /// 不切片
    /// </summary>
    不切片 = 0,

    /// <summary>
    /// 日报切片
    /// </summary>
    日报切片 = 1,

    ///// <summary>
    ///// 三日切片
    ///// </summary>
    //三日切片 = 2,

    /// <summary>
    /// 周报切片
    /// </summary>
    周报切片 = 3,

    /// <summary>
    /// 月报切片
    /// </summary>
    月报切片 = 4,

    /// <summary>
    /// 季报切片
    /// </summary>
    季报切片 = 5,

    /// <summary>
    /// 月报切片
    /// </summary>
    年报切片 = 6,
  }

  /// <summary>
  /// 门店缴款常量
  /// </summary>
  public class DateSplitModeConstants {
    /// <summary>
    /// 动态列 支付方式金额 字段名
    /// </summary>
    public const string DateRange_FieldName = "date_range";

    /// <summary>
    /// 创建日期范围
    /// </summary>
    /// <param name="dateRange"></param>
    /// <returns></returns>
    public static string GenerateDateRangeStr(DateRange dateRange) => $"{dateRange.StartDate.ToString("yyyy年MM月dd日")}-{dateRange.EndDate.ToString("yyyy年MM月dd日")}";

    /// <summary>
    /// 会员账龄分析报表
    /// </summary>
    public static int[] CustomerOrgAccountPss = new int[] {
      (int)EnumDateSplitMode.不切片,
      (int)EnumDateSplitMode.日报切片,
      (int)EnumDateSplitMode.周报切片,
      (int)EnumDateSplitMode.月报切片,
      (int)EnumDateSplitMode.季报切片,
      (int)EnumDateSplitMode.年报切片,
    };


  }

  /// <summary>
  /// 
  /// </summary>
  public class OrgDateRangeDto {
    /// <summary>
    /// 
    /// </summary>
    public virtual DateRange DateRange { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public virtual List<long> OrgIds { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public virtual List<string> OrgCodes { get; set; }
  }
}
